﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

namespace BaoJian
{
    public partial class _Default : System.Web.UI.Page
    {
        private WebProfile Profile
        {
            get { return new WebProfile(Context.Profile); }
        }
        
        string Region = (HttpContext.Current.Request.Cookies["region"] == null || HttpContext.Current.Request.Cookies["region"].Value == "" || HttpContext.Current.Request.Cookies["region"].Value.ToLower() == "beijing") ? "beijing" : HttpContext.Current.Request.Cookies["region"].Value as string;
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Response.Cookies["region"] == null)
            {
                HttpCookie cookie = new HttpCookie("region", "beijing");
                Response.Cookies.Add(cookie);
            }
            else if (Response.Cookies["region"].Value != "beijing")
            {
                Response.Cookies["region"].Value = "beijing";
            }
        }
    }
}
